:root {
  font-size: 16px;
  box-sizing: border-box;
}

.headwrap {
  width: 100vw;
 
}

.top {
  
  width: 75vw;
  max-width: 1440px;
  height: 4.5rem;
  margin: 0 auto;

  display: grid;
  grid-gap: 0.5rem;
  grid-template-columns: 8rem auto 2fr;
  grid-template-rows: 2rem 2rem;
  grid-template-areas:
    "logo slogan  language "
    "logo slogan  tel";
}

.top .logo {
  grid-area: logo;
  width: 8rem;
  height: 4rem;
  display: grid;
  justify-items: center;
  align-items: center;
  /* border: 1px solid #f00; */
}

.top .logo a {
  display: grid;
  justify-items: center;
  align-items: center;
  /* 只有直接子元素才能居中 所以此处要加a标签 */
  /* border: 1px solid #00f; */
}

.top .logo a img {
  width: 80%;
  height: auto;
  padding-right: 1rem;
  border-right: 1px solid #ccc;
}

.top .slogan {
  grid-area: slogan;
  margin-top: 0.5rem;
  height: 3rem;

  display: grid;
  justify-items: start;
  /* 设置容器内子项目的对齐方式 */
  /* border: 1px solid #ccc; */
}

.top .slogan h1 {
  line-height: 1rem;
  font-size: 1rem;
  justify-self: start;
  /* 设置本身 h1 相对父容器在水平方向的对齐方式  */
  align-self: end;
  /* 设置本身 h1 相对父容器在垂直方向的对齐方式  */
  /* border: 1px solid #ff0; */
}

.top .slogan span {
  line-height: 1rem;
  font-size: 0.75rem;
  /* border: 1px solid #00f; */
  align-self: end;
}

.top .language {
  grid-area: language;
  display: flex;
  justify-content: end;
}

.top .language a img {
  margin: 0.5rem 0 0 1rem;
}

.top .tel {
  color: #333;
  text-align: end;
  grid-area: tel;
}

/* 主导航开始 */

.nav {
  width: 100vw;
  background-color: #036;
  
  
}
.nav-inner {
  width: 75vw;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
}
.nav ul {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  padding: 0;
}
.nav ul li {
  width: 5rem;
  height: 3rem;
  line-height: 3rem;
  /* border: #00f 1px solid; */
  position: relative;
}

.nav ul li a {
  width: 100%;
  height: 3rem;
  line-height: 3rem;
  color: #eee;
  display: block;

  text-align: center;
}
.nav ul li a:hover,
.nav ul > li.on > a {
  color: #ff0;
}
.nav ul li dl {
  margin: 0;
  padding: 0;
  position: absolute;
  left: 50%;
  top: 3rem;
  z-index: 999;
  display: none;
  transform: translateX(-50%);
}
.nav ul li dl dt a {
  display: block;
  width: auto;
  height: 50px;
  line-height: 50px;
  text-align: center;
  background: #252525;
  opacity: 0.8;
  color: #fff;
  top: 0;
  font-weight: 300;
  white-space: nowrap;
  padding: 0 15px !important;
}
.nav ul li dl dt a:hover {
  color: #ff0;
  display: block;
}
.nav ul .home {
  margin-left: 15px;
}
.nav ul .on.home a {
  vertical-align: middle;

  color: #fff;
}
.nav ul .home a:hover {
  color: #fff;
}
.nav ul .home:after,
.nav ul li:nth-child(2):after {
  display: none;
}

/* 手机端--适用于小于1200的屏幕 媒体查询1200px 开始  */
@media screen and (max-width: 1200px) {
  .top {
    width: 95vw;
    height: 4rem;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 6rem 2fr 1fr;
    grid-template-rows: 3rem;
    grid-gap: 0.25rem;
    grid-template-areas: "logo slogan  language";

    /* background-color: #eee; */
  }
  .top .logo {
    grid-area: logo;
    width: 6rem;
    /* border: #00f 1px solid; */
  }

  .top .logo a {
    display: grid;
    justify-items:left;
    align-items: center;
    /* 只有直接子元素才能居中 所以此处要加a标签 */
  }

  .top .logo a img {
    width: 80%;
    height: auto;
    padding-right: 0.5rem;
  }

  .top .slogan {
    grid-area: slogan;
    /* border: #ff0 1px solid; */

  }

  .top .slogan h1 {
    font-size: 1rem;
    line-height: 2rem;
    
    align-self: center;
  }

  .top .slogan span {
    display: none;
  }

  .top .language {
    grid-area: language;
    display: flex;
    justify-content: flex-start;
    margin: 0.25rem 0.25rem 0 0;
    /* border: #00f 1px solid; */
  }

  .top .language img {
    width: auto;
    height: auto;
  }

  .top .tel {
    display: none;
  }

  /* 手机的主导航开始 */

  .nav-inner {
    width: 100vw;
    /* max-width: 1440px; */
    margin: 0 auto;
    padding: 0;
  }
  .nav ul {
    width: 100vw;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  .nav ul li {
    width: 25%;
    height: 2rem;
    margin: 2px auto;
    padding: 0;
    display: inline-block;
    line-height: 2rem;
    /* border: #fff 1px solid; */
    position: relative;
    box-sizing: border-box;
  }

  .nav ul li a {
    width: 100%;
    height: 2rem;
    line-height: 2rem;
    color: #eee;
    display: block;
    text-align: center;
  }

  .nav ul li a:hover,
  .nav ul > li.on > a {
    color: #ff0;
  }
  .nav ul li dl {
    margin: 0;
    padding: 0;
    position: absolute;
    left: -50%;
    top: 3rem;
    z-index: 999;
    display: none;
  }
  .nav ul li dl dt a {
    display: block;
    width: 160px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background: #252525;
    opacity: 0.8;
    color: #fff;
    top: 0;
    font-weight: 300;
    display: none;
  }
  .nav ul li dl dt a:hover {
    color: #ff0;
    display: block;
    width: 160px;
    height: 50px;
    display: none;
  }
  .nav ul .home {
    margin-left: 0;
  }
  .nav ul .on.home a {
    vertical-align: middle;
    color: #fff;
  }
  .nav ul .home a:hover {
    color: #fff;
  }
  .nav ul .home:after,
  .nav ul li:nth-child(2):after {
    display: none;
  }
}
